package com.tedu.dao;

import com.tedu.pojo.Clock;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 疫情打卡
 */
@Mapper
public interface ClockMapper {
    /**
     * 添加记录
     * @param clock
     * @return
     */
    @Insert("INSERT INTO clock (site,TEMP,NAME,createTime) " +
            "VALUES(#{site},#{temp},#{name},#{createTime})")
    public int addClock(Clock clock);

    @Select("select * from clock")
    List<Clock> getAll();
}
